package com.linwen.javase.desgin_pattern.action.strategy;

/**
 * @ClassName StrategyTest
 * @Description
 * @Author lin
 * @Date 2022/6/30 上午12:04
 * @Version V1.0
 */
public class StrategyTest {
    public static void main(String[] args) {
        Context c = new Context();
        Strategy s = new ConcreteStrategyA();
        c.setStrategy(s);
        c.strategyMethod();
        System.out.println("-----------------");
        s = new ConcreteStrategyB();
        c.setStrategy(s);
        c.strategyMethod();
    }
}
